﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyWPF.Models.Curve
{
    public interface ICurve
    {
    }

    /// <summary>
    /// 曲线的完整数据
    /// </summary>
    public class PlotContext
    {
        /// <summary>
        /// 曲线类型
        /// </summary>
        public Model Model { get; set; }

        /// <summary>
        /// 曲线标题
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 数据曲线数据
        /// </summary>
        public List<DataCurve> DataCurves { get; set; }

        /// <summary>
        /// 时间曲线数据
        /// </summary>
        public List<DataCurve> TimeCurves { get; set; }
    }

    /// <summary>
    /// Null:什么都没有只加载曲线样式，DataCurve：纯数据曲线，TimeCurve：x轴是时间
    /// </summary>
    public enum Model
    {
        Null, DataCurve, TimeCurve
    }

    /// <summary>
    /// 数据曲线的数据
    /// </summary>
    public class DataCurve
    {
        /// <summary>
        /// 曲线名字
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// X轴数据
        /// </summary>
        public double[] X { get; set; }

        /// <summary>
        /// Y轴数据
        /// </summary>
        public double[] Y { get; set; }

        /// <summary>
        /// 点大小
        /// </summary>
        public int MarkSize { get; set; }
        
        /// <summary>
        /// 圆滑度
        /// </summary>
        public double SmoothTension { get; set; }
    }
    /// <summary>
    /// 时间曲线的数据
    /// </summary>
    public class TimeCurve
    {
        /// <summary>
        /// 曲线名字
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// X轴数据
        /// </summary>
        public DateTime[] X { get; set; }

        /// <summary>
        /// Y轴数据
        /// </summary>
        public double[] Y { get; set; }
    }
}
